import request from '@/utils/request'

export default{
  getUserList(searchModel){
    return request({
      url: '/user/list',
      method: 'post',
      data:searchModel
    });
  },

  saveUser(user){
    return request({
      url: '/user/save',
      method: 'post',
      data: user
    });
  },

  updatePwd(pwdForm){
    return request({
      url: '/user/pwd',
      method: 'put',
      params:{
        pwd: pwdForm.pwd,
        rePwd: pwdForm.rePwd
      }
    });
  },

  getUserById(id){
    return request({
      url: `/user/${id}`,
      method: 'get',
    });
  },

  deleteUserById(id){
    return request({
      url: `/user/${id}`,
      method: 'delete',
    });
  },
}
